﻿using CS795.TravelAgency.Hotel.Domain.Entities;
using CS795.TravelAgency.Hotel.Domain.Entities.Configurations;
using System.Data.Entity;

namespace CS795.TravelAgency.Hotel.Domain
{
    public class HotelContext : DbContext
    {
        public DbSet<Payment> Payments { get; set; }
        public DbSet<Quote> Quotes { get; set; }
        public DbSet<Reservation> Reservations { get; set; }
        public DbSet<User> Users { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new PaymentConfiguration());
            modelBuilder.Configurations.Add(new QuoteConfiguration());
            modelBuilder.Configurations.Add(new ReservationConfiguration());
            modelBuilder.Configurations.Add(new UserConfiguration());
        }
    }
}
